Portable electronic devices need a power source to operate. Usually the power source is a battery. For ease of use and keeping the operating cost low, rechargeable batteries may be used. Rechargeable batteries may have multiple charging constraints for proper charging and maintaining a desired performance level. If these constraints are not followed during charging, the batteries may be damaged and/or cause damage to the device and even injure the user in extreme cases. During a charging cycle, the charging current and charging voltage needed by a battery may change. Such devices may comprise a charging circuit for charging the battery, wherein the voltage and/or the current provided to the electronic device is independent of requirements of the charging circuit and/or the battery. This may lead to power dissipation and raise the temperature of the device.